<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="z" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%
	com.test.model.User currentUser = (com.test.model.User) org.apache.shiro.SecurityUtils.getSubject().getPrincipal();
	request.setAttribute("currentUser", currentUser);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/head.jsp" />
<style type="text/css">
body {
	padding: 40px;
	position: relative;
}

h3 {
	text-align: center;
}

table, th, td {
	text-align: center;
}
</style>
</head>
<body>
	<nav class="navbar navbar-default navbar-static navbar-fixed-top" role="navigation">
	<div class="container-fluid">
		<div>
			<ul class="nav navbar-nav navbar-right">
				<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">欢迎您，${currentUser.realName}
						<span class="caret"></span>
				</a>
					<ul class="dropdown-menu">
						<li><a href="updatePassword.jsp" onclick="window.open(this.href);return false"> 更改个人密码 </a></li>
						<shiro:hasPermission name="USER_REGISTER">
							<li><a href="register.jsp" onclick="window.open(this.href);return false"> 注册新用户 </a></li>
						</shiro:hasPermission>
						<li><a href="/test/logout.do">退出登录</a></li>
					</ul></li>
			</ul>
		</div>
	</div>
	</nav>
	<div class="container col-md-6 col-md-offset-3">
		<div class="page-header">
			<h3>人员信息</h3>
		</div>
		<div>
			<table class="table table-striped table-bordered  table-hover">
				<tr>
					<th>姓名</th>
					<td>${person.personName}</td>
				</tr>
				<tr>
					<th>出生日期</th>
					<td>${person.birthTime.toString().substring(0, 10)}</td>
				</tr>
				<tr>
					<th>性别</th>
					<td>
						<z:codeName entityName="Gender" value="${person.gender}" />
					</td>
				</tr>
				<tr>
					<th>身份证号码</th>
					<td>${person.identityNumber}</td>
				</tr>
				<tr>
				<tr>
					<th>电话号码</th>
					<td>${person.phoneNumber}</td>
				</tr>
				<tr>
					<th>婚姻状况</th>
					<td>
						<z:codeName entityName="MaritalStatu" value="${person.maritalStatus}" />
					</td>
				</tr>
				<tr>
					<th>配偶姓名</th>
					<td>${person.spouseName}</td>
				</tr>
				<tr>
					<th>所在部门</th>
					<td>
						<z:codeName entityName="Department" value="${person.department}" />
					</td>
				</tr>
			</table>
		</div>
		<div class="form-inline col-md-6">
			<button type="button" class="btn btn-default " id="return">关闭</button>
		</div>
	</div>
	<script type="text/javascript">
	$("#return").click(function(){
  		window.close();
	} );
</script>
</body>
</html>